// Codigo unico de grupo: GPS3_14
// Integrante 1: Juan Manuel Gonzalez Garzon (200913667)

import java.io.*;

public class digsum {

	public static void main(String[] args) {
		try{
			//TODO Quitar al finalizar la impelemntacion.
			PrintStream log = new PrintStream(new File("./data/out.txt"));
			System.setOut(log);

			BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
			String line = br.readLine();  
			boolean primero=true;

			while (!line.equals("0 0"))
			{
				int resp = 0;

				String[] nums = line.split(" ");
				int numPeque=Integer.parseInt(nums[0]);
				int numGrand=Integer.parseInt(nums[1]);

				resp=mododChambon(numPeque, numGrand);
						//modoPro(numPeque, numGrand);

				if(primero){System.out.print(resp);primero=false;}
				else System.out.print("\r\n"+resp);
				line = br.readLine();
			}
			br.close();
		}
		catch(Exception e){e.printStackTrace();}
	}

	public static int modoPro(int numPeque, int numGrand) {
		int resp=0;
		
		if(numPeque==0)resp=f(numGrand);
		else resp=f(numGrand)-f(numPeque-1);
		
		return resp;
	}

	private static int f(int num) {
		int resp=0;
		
		if(num<10) resp=sumatoria(num);
		else{
			
			String numero=num+"";
			char[] digitos=numero.toCharArray();
			
			int[] numeros = new int[digitos.length];
			int[] sumatorias = new int[digitos.length];
			
			for (int i = 0; i < digitos.length; i++) 
			{
				int esteDigito=Integer.parseInt(digitos[i]+"");
				sumatorias[i]=sumatoria(esteDigito);
				numeros[i]=esteDigito;
				System.out.println((int)Math.pow(10, i)+" : "+numeros[i]+"   "+sumatorias[i]);
			}
		}
		return resp;
	}

	private static int sumatoria(int num) {
		return (num*(num+1)/2);
	}

	public static int mododChambon(int numPeque, int numGrand) {
		int resp=0;
		
		for (int i = numPeque; i <= numGrand; i++) {
			String este=i+"";
			char[] aux= este.toCharArray();
			for (int j = 0; j < aux.length; j++) {
				int lol= aux[j];
				resp+=(lol-48);
			}
		}
		
		return resp;
	}

}